
<?

if(isset($_SESSION['LogOK'])=="OK")
{     
        error_reporting(0);
    
          $objLogUser=new LogUser();                  
          
          $objLogUser->logUsuario($_SESSION['idUsuarioLogin'],"LOGOUT");
       echo '<script>alert("No se encuentra logueado - Vuelva a loguearse");</script>';
       session_destroy(); 
    echo '<meta http-equiv="REFRESH" content="0;URL='.LocationIndexphp.'" />'; 
}else
{
 
} 

//    require('Main.php');
    require_once("InterfazSQL.php");
    
session_start();
if(isset($_POST['nameLoguearUsuario']))
{
    if(($_POST['UserMail']!=null)&&($_POST['Password']!=null) )
    require_once("ValidarUsuario.php");
    else
    echo '<script>alert("DEBE INGRESAR USUARIO Y PASSWORD");
             </script>';
         
}


?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<title>Gestor Bonpland </title>
    
    <link rel='StyleSheet' href="Estilos.css" type="text/css" media='screen'/>
   <script type="text/javascript" src="jquery/js/jquery-1.4.4.min.js"></script>
   <script type="text/javascript" src="jquery/js/jquery-ui-1.8.7.custom.min.js"></script>


	
	<link rel="stylesheet" href="jquery/development-bundle/themes/base/jquery.ui.all.css"/>
	<script src="jquery/development-bundle/jquery-1.4.4.js"></script> 
	<script src="jquery/development-bundle/ui/jquery.ui.core.js"></script>
	<script src="jquery/development-bundle/ui/jquery.ui.widget.js"></script>
	<script src="jquery/development-bundle/ui/jquery.ui.tabs.js"></script>
		<script src="jquery/development-bundle/ui/jquery.ui.datepicker.js"></script>	
	  <link rel="stylesheet" href="jquery/development-bundle/demos/demos.css"/>
      
<script>
$(function() {
	$( "button, input:submit,input:file, input:button, input:reset", ".demo" ).button();
    });
</script>

</head>

<body  background="images/Fondos/fg.png"  >

<form method="post"  style="font-family: Tahoma, serif; font-size: x-small;">
<div id="LoginBox">
    <table class="shadowRoundedInner1" width="80%" align="center" bgcolor="#7C7C7C">
        <tr>
            <td width="100%" height="1000px" bgcolor="#7C7C7C" valign="top">
                <table align="center" width="100%"  bgcolor="#7C7C7C" style="border-color: gray;"  >
                    <tr>
                        <td height="100px" width="100%" align="center">
                            <table class="shadowRoundedInner1" bgcolor="white" width="100%" >
                                <tr>
                                    <td style="height: 30px;" bgcolor="white" width="100%" align="center">
                                    
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
                <table align="center" width="80%" class=""  bgcolor="7C7C7C"  style="border-color: gray;"  >
                    <tr>
                        <td  height="150px" width="100%" align="center">
                        </td>
                    </tr>
                    <tr>
                        <td align="center" width="100%" bgcolor="#A6A2A7">
                            <table class="shadowRoundedInner1" width="100%">
                                <tr>
                                    <td align="center">
                                        <a style=" font-size: 18px; font-family: Lucida Sans Unicode ;color: #FFFFFF;"> 
                            
                                             <b> Gestor Bonpland - Login </b></a>
                                        </td>
                                </tr>
                            </table> 
                      
                        </td>
                    </tr>
                    <tr>
                        <td class="shadowRoundedInner1" bgcolor="#7C7C7C" width="50%">
                            <table width="100%" align="center" border="0" >
                                <tr>                  
                                    <td width="100%" bgcolor="#A6A2A7">
                                        <table width="100%" align="center">
                                            <tr >
                                                <td width="100%">
                                                    <table width="100%"  align="center">        
                                                        <tr>       
                                                            <td width="10%">
                                                            </td>
                                                            <td  class="shadowRoundedInner1" bgcolor="#7C777D" width="50%" align="center">
                                                                <table  width="100%" align="center" >
                                                                    <tr>
                                                                        <td height="8px">
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td  align="right" width="50%" class="labels" style="color:white; font-size:12px;"> <b>Usuario:</b> </td> 
                                                                        <td align="left" width="50%">
                                                                             <input align="left"  type="text" name="UserMail"  class="labels"/>
                                                                         </td>            
                                                                    </tr>
                                                                    <tr>
                                                                        <td  align="right" width="50%" class="labels" style="color:white; font-size:12px;"> <b>Contrase&ntilde;a: </b> </td> 
                                                                        <td align="left" width="50%"> 
                                                                            <input  align="left" type="password" name="Password" class="labels"/>
                                                                        </td>
                                                                    </tr>                                                  
                                                                   <tr>
                                                                        <td height="8px">
                                                                        </td>
                                                                    </tr>       
                                                                  
                                                                </table>
                                                            </td>
                                                            <td width="10%">
                                                            </td>
                                                        </tr>
                                                    </table>
                                                    
                                                    <table width="100%">
                                                        <tr>
                                                            <td style="height: 4px;"></td>
                                                        </tr>
                                                        <tr> 
                                                            <td width="100%">
                                                                <table width="100%">
                                                                    <tr>
                                                                        <td width="5%">
                                                                        </td>
                                                                        <td align="center">
                                                                            <input type="submit"  name="nameLoguearUsuario" style="background-color: #7C777D; color:white; width:145px" value="Ingresar" > 
                                                                        </td>        
                                                                        <td align="center">
                                                                           <a href="mailto:info@zbctech.com.ar?Subject=Recuperar Contrasena&body=MAIL-Usuario a recuperar:"> 
                                                                           <input type="button" name="nameRecuperarContraHCD" style="background-color: #7C777D; color:white; width:145px;" value="Recuperar Contrase&ntilde;a" ></a> 
                                                                        </td>   
                                                                        <td width="5%">
                                                                        </td>    
                                                                    </tr>
                                                                    
                                                                </table>
                                                            
                                                            </td>       
                 
                                                        </tr> 
                                                    
                                                    </table>
                                                </td>
                                            </tr>                
                                        </table>
                                    </td>
                                </tr>
                            </table>
                    	 </td>
                    </tr>
                </table>
            </td>
        </tr>        
    </table>    

</div>

 </form>
   
</body>

</html>